import React, { Component } from 'react'
import {Redirect, Route, Switch} from 'react-router-dom'
import MyNavLink from '../../../components/ReactRouter/MyNavLink'
import News from './News'
import Message from './Message'
export default class index extends Component {
  render() {
    return (
      <div>
        <h1>我是Home</h1>
        <div>
          <ul className="nav nav-tabs">
            <li>
              <MyNavLink to="/home/home-news">News</MyNavLink>
            </li>
            <li>
              <MyNavLink to="/home/home-message">Message</MyNavLink>
            </li>
            {/* <li>
              <a className="list-group-item active" href="./home-news.html">News</a>
            </li>
            <li>
              <a className="list-group-item " href="./home-message.html">Message</a>
            </li> */}
          </ul>
          <Switch>
            <Route path="/home/home-news" component={News}/>
            <Route path="/home/home-message" component={Message}/>
            <Redirect to="/home/home-news"/>
          </Switch>
        </div>
      </div>
    )
  }
}
